import java.util.Scanner;

public class L2022SB3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        int[] a = new int[26];
        for(int i = 0; i<str.length(); i++){
            a[str.charAt(i) - 'A']++;
        }
        int max = Integer.MIN_VALUE;
        for(int i = 0;i<26;i++){
            max = Math.max(max, a[i]);
        }
        for(int i = 0;i<26;i++){
            if(a[i] == max){
                System.out.print((char)('A'+i));
            }
        }
    }
}